<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>Document</title>
	<style>
        .w {
            width: 800px;
            height: 400px;
            margin: 0 auto;
            background-color: rgba(0,0,0,0.2);
        }
        .fixed {
            position: fixed;
            width: 50px;
            height: 50px;
			margin-left: 800px;
            background-color: red;
        }
        /* .fixed {
            position: fixed;
            width: 50px;
            height: 50px;
            left: 50%;
            margin-left: 400px;
            background-color: red;   
        } */
		</style>
</head>
<body>
	<!-- fixed 不添加 top 等定位控制时，可以基础父级定位，可添加margin来控制位置 -->
    <button onclick="open">打开</button>
    <script>
        function open(){
            window.open("http://www.runoob.com","_blank","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=400, height=400");
        }
    </script>
</body>
</html>